package com.jiazhong.basic.pack0316.thread.work01;

public class App {
    public static void main(String[] args) {
        Train train = new Train();
        Window w1 = new Window(train);
        Window w2 = new Window(train);
        Window w3 = new Window(train);
        Window w4 = new Window(train);
        Thread t1 = new Thread(w1);
        t1.setName("窗口一");
        Thread t2 = new Thread(w2);
        t2.setName("窗口二");
        Thread t3 = new Thread(w3);
        t3.setName("窗口三");
        Thread t4 = new Thread(w4);
        t4.setName("窗口四");
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
